/**
 * Created by DevilsEyes on 2016/2/13.
 * ==========================
 *         课件 course
 * ==========================
 * 用于存放课件的数据结构
 *
 */
'use strict';
var db = require('./db.js').mongoose;
var Schema = db.Schema;

var course_Schema = new Schema({

    title: String,//标题

    tags: String,//标签  A#B#C#D
    view: Number,//浏览量
    class: String,//班级  A#B#C#D

    imgs: [String],//图片 文件JSON字符串组
    article: String,//内容(允许换行\n)
    attachments: [String],//附件 文件JSON字符串组

    updated: {
        type: Number,
        default: new Date().getTime()
    }
});

var course_Model = db.model("course", course_Schema);

module.exports = course_Model;